package com.lanlengran.pulltorefreshtest;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;

import com.lanlengran.pulltorefreshtest.myview.RefreshableView;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class MainActivity extends AppCompatActivity {
    @BindView(R.id.textview)
    TextView textview;
    @BindView(R.id.refreshableview)
    RefreshableView refreshableview;
    @BindView(R.id.listview)
    ListView listview;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
        refreshableview.setSonView(listview);

        List<String> list=new ArrayList();
        for (int i=0;i<10;i++){
            list.add("我是帅哥啦啦啦啦啦啦啦"+i);
        }
        ArrayAdapter adapter=new ArrayAdapter(this,android.R.layout.simple_list_item_activated_1,list);
        listview.setAdapter(adapter);
    }
}
